//
//  JZAlbum.m
//  QuanZiChat
//
//  Created by 张洪林 on 15/11/28.
//  Copyright © 2015年 ZhongHongLin. All rights reserved.
//

#import "JZAlbum.h"

@implementation JZPhoto

+ (instancetype)photoWithOriginUrl:(NSString *)originUrl thumbnailUrl:(NSString *)thumbnailUrl {
    JZPhoto *photo = [[JZPhoto alloc] init];
    photo.originUrl = originUrl;
    photo.thumbnailUrl = thumbnailUrl;
    return photo;
}

- (NSString *)actualThumbnailUrl {
    if (self.thumbnailUrl) {
        return self.thumbnailUrl;
    } else {
        return self.originUrl;
    }
}

@end
@implementation JZAlbum
+ (CGFloat)contentWidth {
    return CGRectGetWidth([[UIScreen mainScreen] bounds])-3*kLZAlbumAvatarSpacing-kLZAlbumAvatarImageSize;
}
@end
